package com.huayi.order.service;


import com.huayi.order.controller.OrderSendReq;
import com.huayi.order.entity.*;
import com.huayi.order.thymeleaf.PagingResponse;
import com.huayi.order.utils.ResultVo;

import java.util.List;

/**
 * 描述：
 * 销售外发订单service
 *
 * @author qlp
 * @date 2020-01-10 16:50
 */
public interface ErpSalesOrderService {
    PagingResponse<ErpSalesOrderDetailVo> getList(int pageIndex, int pageSize, String orderNum, String contactMobile, Integer saleType, Integer status, Integer startTime, Integer endTime,Integer salesManId);
    List<ErpSalesOrderItemVo> getOrderItemListAll(String orderNum, String contactMobile, Integer saleType, Integer status, Integer startTime, Integer endTime);


    /**
     * 获取详情
     * @param orderId
     * @return
     */
    ErpSalesOrderDetailVo getDetailById(Long orderId);

    /**
     * 获取订单item
     * @param orderItemId
     * @return
     */
    ErpSalesOrderItemEntity getOrderItemByItemId(Long orderItemId);


//    /**
//     * 导入批批网订单
//     * @param orderList 订单列表
//     * @param buyerUserId 客户userId
//     * @return
//     */
//    ResultVo<String> importExcelOrderForPiPi(List<OrderImportPiPiEntity> orderList, Integer buyerUserId);

    /**
     * 导入代发订单
     * @param orderList
     * @param buyerUserId
     * @return
     */
    ResultVo<String> importExcelOrderForDaiFa(List<OrderImportDaiFaEntity> orderList, Integer buyerUserId);

    /**
     * 修改orderItem 规格
     * @param orderItem
     */
    void updateOrderItemSkuByItemId(ErpSalesOrderItemEntity orderItem);


    /**
     * 取消订单
     * @param orderId
     * @return
     */
    ResultVo<Integer> cancelOrder(Long orderId);
    ResultVo<Integer> refundOrder(Long orderId);


    /**
     * HY下单
     * @param salesOrder
     * @return
     */
    ResultVo<Integer> editSalesOrder(ErpSalesOrderDetailVo salesOrder);

    /**
     * 更新物流信息
     * @param orderId
     * @param logisticsCode
     * @param logisticsCompany
     * @param logisticsCompanyCode
     * @param logisticsImg
     */
    void updateLogisticsStatus(Long orderId,String logisticsCode,String logisticsCompany,String logisticsCompanyCode,String logisticsImg);

    /**
     * 订单发货
     * @param orderId
     * @return
     */
    ResultVo<Integer> sendOrder(Long orderId);

    /**
     * 订单发货
     * @param orderSendReq
     * @return
     */
    ResultVo<Integer> sendOrder(OrderSendReq orderSendReq);


}
